﻿// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "BaseCharacter.h"
#include "Components/WidgetComponent.h"
#include "UMG/HealthBarWidget.h"
#include "BossCharacter.generated.h"

class UBehaviorTree;

UCLASS()
class COMBAT_GAME_CPP_API ABossCharacter : public ABaseCharacter
{
	GENERATED_BODY()

public:
	// Sets default values for this character's properties
	ABossCharacter();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

	
	// AI行为树
	UPROPERTY(BlueprintReadWrite, EditAnywhere)
	UBehaviorTree* BehaviorTree;

	//	攻击动画
	UPROPERTY(BlueprintReadWrite, EditAnywhere)
	UAnimMontage* AttackMontage;

	// 攻击
	void PlayAttackMontage() override;

	UFUNCTION(BlueprintCallable)
	virtual void AttackDamage() override;


	UFUNCTION(BlueprintCallable)
	virtual void TakeHitDamage(const float DamageValue) override;

	UFUNCTION(BlueprintCallable)
	virtual void DeathClear() override;

	UFUNCTION(BlueprintCallable)
	void DestroySelf();

	// UPROPERTY(BlueprintReadWrite, EditAnywhere)
	// UWidgetComponent* WidgetComponent;

	//血条widget
	// UPROPERTY(BlueprintReadWrite, EditAnywhere)
	// TSubclassOf<UHealthBarWidget> HealthBarWidgetClass;
};
